/**
 * @某个模块下的路由:
 */
import Layout from "@/layout";
/**资产中心下的路由地址**/
const PropertyManage = () => import("views/propertyCenter/propertyManage/propertyManage");
const AuthManage = () => import("views/propertyCenter/authManage");
const AuthDetailManage = () => import("views/propertyCenter/authManage/detail");
/*配置中心*/
const IndexManage = () => import("views/configCenter/indexManage/indexManage");
const LabelManage = () => import("views/configCenter/labelManage/label");

//审计中心
const AllEvaluateManage = () => import("views/evaluateCenter/evaluateManage/allEvaluate");
const AllEvaluateDetail = () => import("views/evaluateCenter/evaluateManage/allEvaluateDetail");
const SpecialEvaluateManage = () => import("views/evaluateCenter/evaluateManage/specialEvaluate");
const SpecialEvaluateDetail = () => import("views/evaluateCenter/evaluateManage/specialEvaluateDetail");
//权限审计
const AuthEvaluate = () => import("views/evaluateCenter/evaluateManage/authEvaluate");
const AuthEvaluateDetail = () => import("views/evaluateCenter/evaluateManage/authEvaluate/detail");
const AuthEvaluateQuickDetail = () => import("views/evaluateCenter/evaluateManage/authEvaluate/quickDetail");

const AllMonitoringManage = () => import("views/evaluateCenter/monitoringManage/allMonitoring");
const AllMonitoringDetail = () => import("views/evaluateCenter/monitoringManage/allMonitoringDetail");
const SpecialMonitoringManage = () => import("views/evaluateCenter/monitoringManage/specialMonitoring");
const SpecialMonitoringDetail = () => import("views/evaluateCenter/monitoringManage/specialMonitoringDetail");

//管控中心
const RiskManage = () => import("views/controlCenter/riskManage/riskManage");
const RiskManageDetail = () => import("views/controlCenter/riskManage/riskManageDetail");
//数据中心
const LinkSearch = () => import("views/dataCenter/linkSearch/linkSearch");
//咨询中心
const ConsultRecord = () => import("views/consultCenter/record/record");
const ConsultDetail = () => import("views/consultCenter/record/detail");
// const ConsultConfig = () => import("views/consultCenter/record/config");

export default {
  //感知中心下的路由
  property: [
    {
      path: "/property",
      component: Layout,
      redirect: "/property/manage",
      // meta: { title: "资产管理", icon: "dashboard" },
      children: [
        {
          path: "manage",
          name: "manage",
          component: PropertyManage,
          meta: { title: "资产管理", icon: "el-icon-s-ticket" },
        },

        {
          path: "form",
          name: "propertyEdit",
          hidden: true,
          meta: { title: "资产编辑", activeMenu: "/property/manage" },
          component: () => import("views/propertyCenter/propertyManage/propertyEdit"),
        },
        {
          path: "detail",
          name: "propertyDetail",
          hidden: true,
          meta: { title: "资产详情", activeMenu: "/property/manage" },
          component: () => import("views/propertyCenter/propertyManage/propertyDetail"),
        },
      ],
    },
    {
      name: "子系统管理",
      path: "/property/subsystem",
      component: Layout,
      children: [
        {
          path: "manage",
          name: "manage",
          component: () => import("views/propertyCenter/subsystemManage/subsystemManage"),
          meta: { title: "子系统管理", icon: "el-icon-s-flag" },
        },
        {
          path: "edit",
          hidden: true,
          component: () => import("views/propertyCenter/subsystemManage/edit"),
          meta: { title: "资产详情", activeMenu: "/property/subsystem/manage" },
        },
        {
          path: "manage/detail",
          name: "subsystemDetail",
          hidden: true,
          component: () => import("views/propertyCenter/subsystemManage/subsystemDetail"),
          meta: { title: "资产详情", activeMenu: "/property/subsystem/manage" },
        },
      ],
    },
    {
      path: "/property/auth",
      component: Layout,
      children: [
        {
          path: "list",
          component: AuthManage,
          meta: { title: "权限资产管理", icon: "el-icon-s-cooperation" },
        },
        {
          path: "detail",
          hidden: true,
          component: AuthDetailManage,
          meta: { title: "权限资产管理详情", activeMenu: "/property/auth/list" },
        },
      ],
    },
  ],
  //配置中心
  config: [
    {
      name: "指标管理",
      path: "/config",
      component: Layout,
      redirect: "/config/index",
      children: [
        {
          path: "index",
          name: "indexManage",
          component: IndexManage,
          meta: { title: "指标管理", icon: "el-icon-s-promotion" },
        },
        {
          path: "form",
          name: "indexForm",
          hidden: true,
          component: () => import("views/configCenter/indexManage/indexForm"),
          meta: { title: "指标表单", icon: "dashboard", activeMenu: "/config/index" },
        },
        {
          path: "detail",
          name: "indexDetail",
          hidden: true,
          component: () => import("views/configCenter/indexManage/indexDetail"),
          meta: { title: "指标详情", icon: "dashboard", activeMenu: "/config/index" },
        },
      ],
    },
    {
      name: "场景配置",
      path: "/config/scenemanage",
      component: Layout,
      children: [
        {
          path: "scenemanage",
          name: "sceneManage",
          component: () => import("views/configCenter/sceneManage/indexManage"),
          meta: { title: "场景配置", icon: "el-icon-s-flag" },
        },
        {
          path: "sceneform",
          name: "sceneForm",
          hidden: true,
          component: () => import("views/configCenter/sceneManage/indexForm"),
          meta: { title: "场景配置添加/编辑", icon: "el-icon-s-flag", activeMenu: "/config/scenemanage/scenemanage" }, //activeMenu没起作用，因为这个数据是upm配置获取的。在这写没起效果
        },
      ],
    },
    {
      name: "场景列表",
      path: "/config/scenelist",
      component: Layout,
      children: [
        {
          path: "scenelist",
          name: "sceneList",
          component: () => import("views/configCenter/sceneList/indexManage"),
          meta: { title: "场景列表", icon: "el-icon-s-finance" },
        },
        {
          path: "listform",
          name: "listForm",
          hidden: true,
          component: () => import("views/configCenter/sceneList/indexForm"),
          meta: { title: "场景列表添加/编辑", icon: "el-icon-s-flag", activeMenu: "/config/scenelist/scenelist" },
        },
        {
          path: "listdetail",
          name: "listDetail",
          hidden: true,
          component: () => import("views/configCenter/sceneList/indexDetail"),
          meta: { title: "场景详情", icon: "el-icon-s-flag", activeMenu: "/config/scenelist/scenelist" },
        },
      ],
    },
    {
      name: "标签管理",
      path: "/config/label",
      component: Layout,
      children: [
        {
          path: "label",
          name: "labelManage",
          component: LabelManage,
          meta: { title: "标签管理", icon: "el-icon-key" },
        },
      ],
    },
  ],
  //审计中心
  evaluate: [
    {
      path: "/evaluate",
      component: Layout,
      redirect: "/evaluate/manage",
      meta: { title: "审计管理", icon: "el-icon-eleme" },
      children: [
        {
          path: "manage",
          name: "allEvaluateManage",
          component: AllEvaluateManage,
          meta: { title: "全项审计", icon: "el-icon-collection-tag" },
        },
        {
          path: "manage/quick",
          name: "allQuickEvaluateManage",
          component: AllEvaluateManage,
          meta: { title: "全项快捷审计", icon: "el-icon-collection-tag" },
        },
        {
          path: "manage/special",
          name: "specialEvaluateManage",
          component: SpecialEvaluateManage,
          meta: { title: "专项审计", icon: "el-icon-collection-tag" },
        },
        {
          path: "manage/auto",
          component: AllEvaluateManage,
          meta: { title: "全自动审计", icon: "el-icon-collection-tag" },
        },
        {
          path: "manage/detail",
          name: "allEvaluateDetail",
          hidden: true, //这个写true 就不会出现两个层级了
          component: AllEvaluateDetail,
          meta: { activeMenu: "/evaluate/manage" },
        },
        {
          path: "manage/quick/detail",
          name: "allQuickEvaluateDetail",
          hidden: true, //这个写true 就不会出现两个层级了
          component: AllEvaluateDetail,
          meta: { activeMenu: "/evaluate/manage/quick" },
        },
        {
          path: "manage/auto/detail",
          hidden: true,
          name: "autoEvaluateDetail",
          component: AllEvaluateDetail,
          meta: { activeMenu: "/evaluate/manage/auto" },
        },
        {
          path: "manage/special/detail",
          name: "specialEvaluateDetail",
          hidden: true, //这个写true 就不会出现两个层级了
          component: SpecialEvaluateDetail,
          meta: { activeMenu: "/evaluate/manage/special" },
        },
        //权限审计
        {
          path: "manage/auth",
          component: AuthEvaluate,
          meta: { title: "权限审计", icon: "el-icon-collection-tag" },
        },
        {
          path: "manage/auth/quick",
          component: AuthEvaluate,
          meta: { title: "权限快捷审计", icon: "el-icon-collection-tag" },
        },
        {
          path: "manage/auth/detail",
          component: AuthEvaluateDetail,
          name: "authEvaluateDetail",
          hidden: true,
          meta: { activeMenu: "/evaluate/manage/auth" },
        },
        {
          path: "manage/auth/quick/detail",
          hidden: true,
          component: AuthEvaluateQuickDetail,
          name: "authEvaluateQuickDetail",
          meta: { activeMenu: "/evaluate/manage/auth/quick" },
        },
      ],
    },
    {
      path: "/evaluate/monitoring",
      component: Layout,
      redirect: "/evaluate/monitoring/list",
      meta: { title: "监控管理", icon: "el-icon-camera" },
      children: [
        {
          path: "list",
          name: "allMonitoringManage",
          component: AllMonitoringManage,
          meta: { title: "全项监控", icon: "el-icon-collection-tag" },
        },
        {
          path: "detail",
          name: "allMonitoringDetail",
          hidden: true,
          component: AllMonitoringDetail,
          meta: { activeMenu: "/evaluate/monitoring/list" },
        },
        {
          path: "special",
          name: "specialMonitoringManage",
          component: SpecialMonitoringManage,
          meta: { title: "专项监控", icon: "el-icon-collection-tag" },
        },
        {
          path: "special/detail",
          name: "specialMonitoringDetail",
          hidden: true,
          component: SpecialMonitoringDetail,
          meta: { activeMenu: "/evaluate/monitoring/special" },
        },
      ],
    },
  ],
  //管控中心下的路由
  control: [
    {
      path: "/control",
      component: Layout,
      redirect: "/control/risk",
      children: [
        {
          path: "risk",
          name: "riskManage",
          component: RiskManage,
          meta: { title: "风险管理", icon: "el-icon-bell" },
        },
        {
          path: "risk/detail",
          name: "riskManageDetail",
          hidden: true,
          component: RiskManageDetail,
          meta: { activeMenu: "/control/risk" },
        },
      ],
    },
  ],
  //数据中心下的路由
  data: [
    {
      path: "/data",
      component: Layout,
      redirect: "/data/link",
      children: [
        {
          path: "link",
          name: "linkSearch",
          component: LinkSearch,
          meta: { title: "关联查询", icon: "el-icon-ship" },
        },
      ],
    },
  ],
  //咨询中心
  consult: [
    {
      path: "/consult",
      component: Layout,
      redirect: "/consult/record",
      children: [
        {
          path: "record",
          name: "consultRecord",
          component: ConsultRecord,
          meta: { title: "咨询记录", icon: "el-icon-service" },
        },
        {
          path: "detail",
          name: "consultDetail",
          hidden: true,
          component: ConsultDetail,
          meta: { activeMenu: "/consult/record" },
        },
      ],
    },
  ],
};
